﻿using System;
using System.Web.UI;

namespace ADEVSO.Web.UI
{
    public class GlobalizationUserControl : UserControl
    {
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (Page.Master != null)
                (Page.Master as GlobalizationMasterPage).ApplyCulture();
            else (Page as GlobalizationPage).ApplyCulture();
        }

        /// <summary>
        /// Page Current Culture
        /// </summary>
        public String CurrentCulture
        {
            get
            {
                return (Page as GlobalizationPage).CurrentCulture;
            }
            set
            {
                (Page as GlobalizationPage).CurrentCulture = value;
            }
        }
    }
}